Add full Lambda service plugin with CRUD, triggers, and documentation#2
Merged
Add full Lambda service plugin with CRUD, triggers, and documentation#2
Conversation
… aliases Implement a complete Lambda plugin following the established service pattern, covering both backend and frontend. Backend: - Add "lambda" to ALL_SERVICES and ENABLED_SERVICES in config.ts - Add LambdaClient to client-cache.ts and @aws-sdk/client-lambda dependency - Create plugins/lambda/ with schemas, service, routes, and index - LambdaService: listFunctions, getFunction, createFunction, updateCode, updateConfig, deleteFunction, invokeFunction, listVersions, listAliases - 9 Fastify routes (GET/POST/PUT/DELETE) with TypeBox validation - Register lambda in bundle.ts plugin map - Add lambda to docker-compose.yaml SERVICES Frontend: - Add React Query hooks for all Lambda operations (api/lambda.ts) - Add route pages: /lambda/ (list) and /lambda/$functionName (detail) - FunctionList: searchable table with create dialog and delete confirmation - FunctionDetail: 4-tab view (Configuration, Invoke, Versions, Aliases) - FunctionCreateDialog: form with runtime selector and zip upload - InvokeFunctionForm: payload editor, invocation type, result display with decoded logs - Add Lambda entry (Zap icon) to Sidebar and Dashboard Tests: - Unit tests for LambdaService (49 tests) and routes (24 tests) - Plugin index registration test - Integration test with full CRUD flow against LocalStack - Update config.test.ts and plugin-index.test.ts for lambda Documentation: - Create docs/lambda.md with API reference, examples, and UI guide - Update README.md: services table, ENABLED_SERVICES, project structure, Node.js 24 prerequisite, active service detection section
…d resource policy detection The Lambda function detail view now includes a Triggers tab that combines two data sources into a unified view: - Resource-based policy triggers (S3, SNS, API Gateway, EventBridge, etc.) parsed from the function's resource policy via GetPolicy. These appear as a read-only table showing the invoking service, source ARN, and policy statement ID. - Event source mappings (SQS, DynamoDB Streams, Kinesis) fetched via ListEventSourceMappings, with support for creating new mappings and deleting existing ones through the UI. Backend: - Add getFunctionTriggers (combines listEventSourceMappings + getResourcePolicyTriggers) - Add createEventSourceMapping and deleteEventSourceMapping to LambdaService - Add GET /:functionName/triggers, POST /:functionName/event-source-mappings, DELETE /event-source-mappings/:uuid routes - Add TypeBox schemas for triggers, policy triggers, and create response Frontend: - Add useFunctionTriggers, useCreateEventSourceMapping, useDeleteEventSourceMapping hooks - Add TriggersTab component with two-section layout, inline create form, and delete confirmation dialog Tests: - Service unit tests: +16 (event source mappings CRUD, policy parsing, combined triggers) - Routes unit tests: +7 (GET triggers, POST/DELETE event-source-mappings) - Integration tests: +4 (list/create/list/delete triggers against LocalStack) - Add lambda to test container SERVICES list - Add retry logic with extended timeouts for Lambda integration tests (LocalStack needs up to ~40s for functions to become Active) Documentation: - Update docs/lambda.md with triggers API, examples, error codes, and UI description - Update README.md Lambda service description
296bb3c to
1d40e01
Compare
…in integration tests
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds comprehensive support for AWS Lambda to the LocalStack Explorer project. Lambda is now a fully integrated service, with backend support, API endpoints, UI documentation, and configuration updates. The changes also update the project to require Node.js 24+, and make several improvements to documentation and service management.
Lambda Service Integration
@aws-sdk/client-lambdaas a dependency and integratesLambdaClientinto the AWS client cache (client-cache.ts). [1] [2] [3] [4]packages/backend/src/plugins/lambda/index.ts).Documentation and User Guide Updates
docs/lambda.mdwith endpoint documentation, request/response examples, error handling, UI component descriptions, and backend architecture.Configuration and Deployment
Project Requirements
Service Health and UI Improvements
These changes collectively enable full Lambda management in LocalStack Explorer, aligning it with other AWS services already supported in the application.